// Block.h
#pragma once
#include <graphics.h>
#include <vector>

struct Point {
    int row;
    int col;
};

class Block {
private:
    static IMAGE* imgs[8];
    static int size;
    int blockType;
    IMAGE* img;
    Point smallBlock[4];

public:
    Block();
    ~Block();
    void drop();
    void moveLeftRight(int offset);
    void draw(int leftMargin, int topMargin);
    static IMAGE** getImages();
    Block& operator=(const Block& other);
    bool blockInMap(const std::vector<std::vector<int>>& map);
    void solidify(std::vector<std::vector<int>>& map);
    void rotate();
    int getBlockType() const { return blockType; }
    Point getSmallBlockPoint(int index) const { return smallBlock[index]; }
};